broker.id={{ broker_id }}
port=9092
host.name={{ ansible_host }}

delete.topic.enable=true
auto.create.topics.enable=true
default.replication.factor=2
num.replica.fetchers=4
controlled.shutdown.enable=true
auto.leader.rebalance.enable=true

num.network.threads={{ ansible_processor_vcpus }}
num.io.threads={{ ansible_processor_vcpus*2 }}
background.threads=10
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600

log.dirs={{ logs_path }}/kafka
num.partitions=1
num.recovery.threads.per.data.dir=1

offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1

log.retention.hours=1
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
log.flush.interval.messages=10000
log.flush.interval.ms=1000


{% set mhosts=[] %}
{%- for host in groups.kafka -%}
{{ mhosts.append(hostvars[host]['ansible_host']+':2181') }}
{%- endfor -%}
zookeeper.connect={{ mhosts|join(',') }}
zookeeper.connection.timeout.ms=6000
group.initial.rebalance.delay.ms=0